Skip to content

fix: treat rule import failures as errors#95

Merged
rhuanbarreto merged 1 commit into
mainfrom
fix/rule-import-errors
Mar 20, 2026
Merged

fix: treat rule import failures as errors#95
rhuanbarreto merged 1 commit into
mainfrom
fix/rule-import-errors

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

  • Rule files that fail to import (e.g., missing archgate/rules module) were silently logged as warnings and skipped, causing archgate check to exit 0 with "No rules to check"
  • Now loadRuleAdrs throws on import failures instead of swallowing errors, and the check command catches them and exits with code 1
  • Fixes the issue seen in archgate/website#14 where rule import errors appeared as warnings but the check still passed

Test plan

  • bun run validate passes
  • Verify on a project with broken rule imports that archgate check now exits 1

Rule files that fail to import (e.g., missing module resolution) were
silently logged as warnings and skipped, causing `archgate check` to
report "No rules to check" and exit 0. This masked real configuration
errors in CI. Now import failures throw, and the check command catches
them and exits with code 1.
@rhuanbarreto rhuanbarreto merged commit abac53e into main Mar 20, 2026
7 checks passed
@rhuanbarreto rhuanbarreto deleted the fix/rule-import-errors branch March 20, 2026 19:41
@github-actions github-actions Bot mentioned this pull request Mar 20, 2026
rhuanbarreto added a commit that referenced this pull request Mar 20, 2026
fix: treat rule import failures as errors instead of warnings

Rule files that fail to import (e.g., missing module resolution) were
silently logged as warnings and skipped, causing `archgate check` to
report "No rules to check" and exit 0. This masked real configuration
errors in CI. Now import failures throw, and the check command catches
them and exits with code 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant